﻿using Nasty.Core.Attributes;
using Nasty.Core.Entity;
using SqlSugar;

namespace Nasty.Core.Entity.System
{
    [SugarTable("SysDepartmentUser", TableDescription = "部门用户")]

    public class DepartmentUser
    {
        /// <summary>
        /// 部门Id
        /// </summary>
        [NastyColumn(IsPrimaryKey = true, ColumnName = "DepartmentId", ColumnDescription = "部门Id", Required = true)]
        public string? DepartmentId { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        [NastyColumn(IsPrimaryKey = true, ColumnName = "UserId", ColumnDescription = "用户Id", Required = true)]
        public string? UserId { get; set; }

        /// <summary>
        /// 岗位名称
        /// </summary>
        [SugarColumn(ColumnName = "Post", IsNullable = true, ColumnDescription = "岗位名称")]
        public string? Post { get; set; }

        /// <summary>
        /// 岗位Id
        /// </summary>
        [SugarColumn(ColumnName = "PostId", IsNullable = true, ColumnDescription = "岗位Id")]
        public string? PostId { get; set; }

        /// <summary>
        /// 主要责任部门
        /// </summary>
        [SugarColumn(ColumnName = "IsMaster", IsNullable = true, ColumnDescription = "主要责任部门")]
        public bool IsMaster { get; set; }
    }
}
